<template>
	<view>
		<u-navbar :background="navObj" :is-back="false" :is-fixed="true" height="89" width="100%">
			<div class="title">信息详情</div>

			<view class="left-box" @tap="onClickLeft">
				<u-icon name="arrow-left" size="40" color="#FFF"></u-icon>
			</view>
		</u-navbar>
		
		
		<view class="questionTitle">{{detailObj.title}}</view>
		<view class="answer">{{detailObj.content}}</view>
	</view>
</template>

<script>
	import {
		messageDetails
	} from '@/api/user.js'
	export default {
		data() {
			return {
				navObj: {
					backgroundColor: 'rgb(25, 189, 93)',
				},
				id: null,
				detailObj: {}
			}
		},
		methods: {
			onClickLeft() {
				uni.navigateBack();
			},

		},
		onLoad(val) {
			this.id = val.id;

		},
		mounted() {
			messageDetails({
				id: this.id
			}).then(res => {
				if (res.code == '000000') {
					this.detailObj = res.data
				}
			})
		}
	}
</script>

<style scoped>
	.title {
		position: absolute;
		top: 80rpx;
		left: 50%;
		transform: translateX(-50%);
		font-family: PingFang;
		font-weight: bold;
		font-size: 33rpx;
		color: #FFFFFF;

	}

	.left-box {
		padding-left: 41rpx;
	}
	
	.questionTitle {
		width: 94%;
		height: 90rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		font-size: 28rpx;
		color: #333333;
		margin: 0 auto;
		line-height: 90rpx;
		text-align: center;
		border-bottom: 1rpx solid #f3f3f3;
	}
	
	.answer {
		width: 94%;
		font-family: Microsoft YaHei;
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
		margin: 35rpx auto;
	}
</style>
